Skip to content

Conversation

@brunobergher
Copy link
Collaborator

@brunobergher brunobergher commented Nov 4, 2025

Description

In an effort to help fit within users' workflows, this changes the UI after attempt_completion to show these buttons, instead of just "Start New Task"

image

Which then goes through a workflow which creates a PR on behalf of the user (if gh cli tools are available) or pushes to the remote branch and shares a link to create the PR.

To do that:

  • It introduces a new built-in slash command (/create-pr)
  • Extends the git.ts util file to be better aware of what's a git repo workspace or not, namely to be aware of worktrees (which is worthwhile on its own – and I'm a heavy worktree user)
  • Checks if the workspace is indeed a git and github repo upon attempt_completion and, if it is, shows the button.

Missing nice-to-have: I'm showing the Create PR button every time it's eligible according to what's described above. But ideally we should only show it if it's a git repo and either there are unstaged changes or there are commits in a non-main/master branch. Checking for that seemed too complex for now, it seems non-blocking but a good improvement.

Test Procedure

  1. Open a git-managed workspace (be it a clone or worktree of a github.com repo)
  2. Ask Roo to make some basic change
  3. See the Create PR button
  4. Click on it
  5. Get a PR (or at least a link to create it if gh cli tools aren't installed.

Important

Adds a 'Create PR' button in the UI for GitHub repositories, with supporting command and localization updates.

  • UI Changes:
    • Adds 'Create PR' button in ChatView.tsx for GitHub repositories.
    • Button appears after attempt_completion if in a GitHub repo.
  • Functionality:
    • Implements /create-pr command to facilitate PR creation.
    • Updates ClineProvider to check for GitHub repository status.
  • Localization:
    • Updates localization files for multiple languages to include 'Create PR' button text and descriptions.

This description was created by Ellipsis for 44a7786. You can customize this summary. It will automatically update as commits are pushed.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Nov 4, 2025
roomote and others added 2 commits November 4, 2025 15:32
- Remove /create-pr built-in slash command from built-in-commands.ts
- Add CREATE_PR Support Prompt type with same functionality
- Update Chat UI button to use supportPrompt.create('CREATE_PR')
- Add CREATE_PR translations to all 17 locales
- Revert unrelated slash command tool changes to original state
- Add comprehensive tests for CREATE_PR prompt

The Create PR button now uses a customizable prompt template editable in Settings > Prompts, while maintaining the same user experience.
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Nov 4, 2025
@daniel-lxs daniel-lxs marked this pull request as ready for review November 4, 2025 16:40
@daniel-lxs daniel-lxs requested review from cte, jr and mrubens as code owners November 4, 2025 16:40
@daniel-lxs daniel-lxs moved this from Triage to PR [Needs Review] in Roo Code Roadmap Nov 4, 2025
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. enhancement New feature or request labels Nov 4, 2025
@roomote
Copy link

roomote bot commented Nov 4, 2025

See this task on Roo Code Cloud

Review complete. Latest commit is a clean Italian translation typo fix. Previous UX issue remains unresolved:

  • Input field clearing issue when clicking "Create PR" button - users lose typed text unexpectedly
Previous Reviews

Mention @roomote in a comment to trigger your PR Fixer agent and make changes to this pull request.

@hannesrudolph hannesrudolph added PR - Needs Review and removed Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. labels Nov 4, 2025
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Comment on lines +744 to +750
// Check if primary button is "Create PR"
if (primaryButtonText === t("chat:createPR.title")) {
// Mark that PR creation was requested
setPrCreationRequested(true)
// Send message using the Support Prompt for PR creation
const text = supportPrompt.create("CREATE_PR", {}, customSupportPrompts)
handleSendMessage(text, [])
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clicking the "Create PR" button clears any text the user has typed in the input field. This differs from the follow-up suggestion behavior (lines 1514-1521) which preserves user input. Users may have typed additional context or instructions before clicking "Create PR" and will lose that text unexpectedly.

Fix it with Roo Code or mention @roomote and request a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request lgtm This PR has been approved by a maintainer PR - Needs Review size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Status: PR [Needs Review]

Development

Successfully merging this pull request may close these issues.

5 participants